<?php

/**
 * Localitate form base class.
 *
 * @package    vvberp
 * @subpackage form
 * @author     Flo
 * @version    SVN: $Id: sfPropelFormGeneratedTemplate.php 16976 2009-04-04 12:47:44Z fabien $
 */
class BaseLocalitateForm extends BaseFormPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'id'          => new sfWidgetFormInputHidden(),
      'judet_id'    => new sfWidgetFormPropelChoice(array('model' => 'Judet', 'add_empty' => false)),
      'nume'        => new sfWidgetFormInput(),
      'siruta'      => new sfWidgetFormInput(),
      'mediu'       => new sfWidgetFormInput(),
      'apartenenta' => new sfWidgetFormInput(),
      'updated_at'  => new sfWidgetFormDateTime(),
      'created_by'  => new sfWidgetFormPropelChoice(array('model' => 'sfGuardUser', 'add_empty' => true)),
      'updated_by'  => new sfWidgetFormPropelChoice(array('model' => 'sfGuardUser', 'add_empty' => true)),
    ));

    $this->setValidators(array(
      'id'          => new sfValidatorPropelChoice(array('model' => 'Localitate', 'column' => 'id', 'required' => false)),
      'judet_id'    => new sfValidatorPropelChoice(array('model' => 'Judet', 'column' => 'id')),
      'nume'        => new sfValidatorString(array('max_length' => 255, 'required' => false)),
      'siruta'      => new sfValidatorInteger(array('required' => false)),
      'mediu'       => new sfValidatorString(array('max_length' => 15, 'required' => false)),
      'apartenenta' => new sfValidatorString(array('max_length' => 45, 'required' => false)),
      'updated_at'  => new sfValidatorDateTime(array('required' => false)),
      'created_by'  => new sfValidatorPropelChoice(array('model' => 'sfGuardUser', 'column' => 'id', 'required' => false)),
      'updated_by'  => new sfValidatorPropelChoice(array('model' => 'sfGuardUser', 'column' => 'id', 'required' => false)),
    ));

    $this->widgetSchema->setNameFormat('localitate[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'Localitate';
  }


}
